Skip to content

fix security issue: remove weights_only=False for multimodal example#4104

Open
faradawn wants to merge 1 commit intoNVIDIA:mainfrom
faradawn:fix-security-issue
Open

fix security issue: remove weights_only=False for multimodal example#4104
faradawn wants to merge 1 commit intoNVIDIA:mainfrom
faradawn:fix-security-issue

Conversation

@faradawn
Copy link
Copy Markdown
Contributor

@faradawn faradawn commented Apr 1, 2026

Summary

Fix security issue: https://nvbugspro.nvidia.com/bug/5996966

  • Removes hardcoded weights_only=False from torch.load in examples/multimodal/combine_state_dicts.py (introduced in Multimodal: add load weights only #3452)
  • Users who need legacy checkpoint loading should opt in via TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD=1
  • Adds a one-line note to the multimodal README explaining the env var

Hardcoding weights_only=False is a security risk as it allows arbitrary
code execution. Users who need legacy checkpoint loading should opt in
via TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD=1.

Signed-off-by: Faradawn Yang <73060648+faradawn@users.noreply.github.com>
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot bot commented Apr 1, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@svcnvidia-nemo-ci svcnvidia-nemo-ci marked this pull request as draft April 1, 2026 22:41
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

This PR has been automatically converted to draft because all PRs must start as drafts.

When you are ready for review, click Ready for Review to begin the review process. This will:

  1. Add the oncall reviewer (optional reviewer)
  2. Add required review teams based on your changes

See the contribution guide for more details.

@faradawn faradawn changed the title fix: remove weights_only=False from torch.load in multimodal example fix security issue: remove weights_only=False for multimodal example Apr 1, 2026
@faradawn
Copy link
Copy Markdown
Contributor Author

faradawn commented Apr 1, 2026

/ok to test ee49dfc

@faradawn faradawn marked this pull request as ready for review April 1, 2026 22:45
@svcnvidia-nemo-ci svcnvidia-nemo-ci added this to the Core 0.16 milestone Apr 1, 2026
@faradawn faradawn enabled auto-merge April 1, 2026 22:45
@svcnvidia-nemo-ci svcnvidia-nemo-ci requested a review from a team April 1, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants